<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>服务号-生成二维码</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <style>

        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
            padding: 0 0px;
            height: 24px;
            vertical-align: middle;
        }
        .table-inner{
            width:100%;
        }
        .table-inner td{
            border-bottom: 1px solid #bbbbbb;
        }
        .table-inner .lastTd{
            border-bottom: 0px solid #bbbbbb;
        }
    </style>

</head>
<body>
<section class="content" id="list">
    <div class="south" style="padding-top: 10px;height:50px;line-height:30px;text-align:center;">
        <input type="text" v-model="customerTel" placeholder="输入客户手机号"/>
        <input type="text" v-model="salerId" placeholder="输入销售经理ID"/>
    </div>
    <div class="south" style="padding-top: 10px;height:50px;line-height:30px;text-align:center;">
        <input type="button" value="生成二维码" class="btn oaBtn btn-sm" @click="send()"/>
    </div>
    <div class="south" style="padding-top: 10px;height:50px;line-height:30px;text-align:center;">
        <img v-bind:src="this.url">
    </div>
</section>
</body>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">

    var app = new Vue({
        el: '#list',
        data: {
            customerTel:"",
            salerId:"",
            url:""
        },
        methods: {
            send: function () {

                var that = this;
                if (this.customerTel == "") {
                    alert("客户手机号不能为空");
                    return;
                }
                if (!(/^1[34578]\d{9}$/.test(this.customerTel))) {
                    alert("客户手机号格式不正确");
                    return;
                }
                var data = {"customerTel":this.customerTel,"salerId":this.salerId};
                $.wyui.postMethod("/QRCode/getQRCodeBycustomerTel.json", data, function (r) {
                    that.url = r["url"];
                });
            }
        },

        mounted: function () {
        }
    });
</script>

</body>
</html>